package com.smarthospital.dao.daoService;

import com.smarthospital.dao.mapper.MedicalCardMapper;
import com.smarthospital.entity.pojo.MedicalCard;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MedicalCardMapperService{

    @Resource
    private MedicalCardMapper medicalCardMapper;

    public int insertSelective(MedicalCard pojo){
        return medicalCardMapper.insertSelective(pojo);
    }

    public int update(MedicalCard pojo){
        return medicalCardMapper.update(pojo);
    }

    public List<MedicalCard>  queryByUserId(Long userId) {
        return medicalCardMapper.queryByUserId(userId);
    }

    public MedicalCard queryByUserIdAndHos(Long userId, String hospitalCode) {
        return medicalCardMapper.queryByUserIdAndHos(userId,hospitalCode);
    }
}
